全部文档

7.3行业物模板

提供分页查询行业名称的功能。

7.3.1分页获取行业名称

功能描述:分页查询行业名称。

GET  /api/v1/industry/industryname/page

Query:

Name Type Description Required
currentPage int 页码 Yes
pageSize int 每页条数(范围:1-50) Yes
industryName string 行业名称 No

cURL example:

   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/industry/industryname/page?currentPage=1&pageSize=10&accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
   --header 'platform: 3' \
   --header 'projectId: {projectId}'

Response example:

{
    "data": {
        "currentPage": 1,
        "pageSize": 10,
        "totalCount": 15,
        "totalPage": 2,
        "content": [
            "Some系列",
            "test1",
            "商业共享",
            "商业共享test",
            "智慧建筑",
            "智能农业",
            "智能园区",
            "智能城市",
            "智能工业",
            "智能模板"
        ]
    },
    "success": true,
    "code": 0,
    "msg": null
}

7.3.2分页获取行业物模板信息

功能描述:分页查询行业物模型模板信息。

GET  /api/v1/industry/page

Query:

Name Type Description Required
currentPage int 页码 Yes
pageSize int 每页条数(范围:1-50) Yes
field string 行业名称 No

cURL example:

   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/industry/page?currentPage=1&pageSize=2&accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
   --header 'platform: 3' \
   --header 'projectId: {projectId}'

Response data:

Name Type Description
category string 品类名称
field string 行业名称
id int 物模型的模板ID
scene string 所属场景
description string 描述信息
modified long 修改时间

Response example:

{
    "data": {
        "currentPage": 1,
        "pageSize": 2,
        "totalCount": 387,
        "totalPage": 194,
        "content": [
            {
                "category": "some系列",
                "field": "Some系列",
                "id": 24,
                "scene": "Some系列",
                "modified": 1593593728536,
                "description": ""
            },
            {
                "category": "model2",
                "field": "行业test2",
                "id": 17,
                "scene": "场景test2",
                "modified": 1592373524957,
                "description": "23213"
            }
        ]
    },
    "success": true,
    "code": 0,
    "msg": null
}

7.3.3获取行业物模板下所有功能

功能描述:获取行业物模板下所有功能。

GET  /api/v1/industry/{categoryId}/properties

Path:

Name Type Description Required
categoryId int 物模型的模板ID Yes

cURL example:

   curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/industry/116061/properties?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
   --header 'platform: 3' \
   --header 'projectId: {projectId}'

Response data:

Name Type Description
userId string 用户ID
nodeName string 节点名称
id int 行业ID
category string 品类名称
categoryId string 物模型的模板ID
class int 属性种类 1: 属性, 2: 事件
created long 创建时间
identifier string 属性名
kind int 属性分类 1: 标准, 2: 自定义
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
modified long 修改时间
unit string 属性单位
required boolean 属性是可选还是必选 true: 必选, false: 可选
special struct 对部分数据类型的补充说明
type int 数据类型
specialString string 属性值的说明或限制
accessMode int 读写模式

参数special结构:

Name Type Description
length int string/bytes类型的字符串长度,1~2048
step double 步长, 设备上传数据间隔, 整型/浮点型类型才有, 分别对应整型、浮点
enumArray struct[] 枚举或布尔类型的相关信息的数组(布尔类型时元素的key有且仅有0/1,枚举类型时元素的个数不超过20个,key范围0~127)

参数enumArray结构:

Name Type Description
key int 枚举或布尔类型的值(布尔类型时key有且仅有0/1,枚举类型时key范围0~127)
describe string 值对应的说明

Response example:

{
  "success": true,
  "code": 0,
  "msg": null,
  "data": [
    {
      "name": "ddrdr",
      "accessMode": 1,
      "unit": "",
      "minimum": 0,
      "maximum": 0,
      "specialString": "{\"length\":10}",
      "special": {
        "length": 10
      },
      "required": true,
      "id": 116466,
      "categoryId": 116061,
      "created": 1593841255290,
      "modified": 1593841255290,
      "identifier": "dfer",
      "type": 1,
      "category": "家居安防",
      "class": 1,
      "kind": 1
    }
  ]
}

results matching ""

    No results matching ""